package com.gaofei.service.impl;

import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import com.gaofei.dao.BrandMapper;
import com.gaofei.domain.Brand;
import com.gaofei.service.BrandService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
@Service
public class BrandServiceImpl implements BrandService{
	
	@Autowired
	BrandMapper brandMapper;

	@Override
	public PageInfo<Brand> findAll(int pageNum, int pageSize) {
		PageHelper.startPage(pageNum,pageSize);
		
		return new PageInfo<>(brandMapper.findAll());
	}

	@Override
	public void add(Brand brand) {
		brandMapper.add(brand);
	}

}
